home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1376_sendmail_forwarding_to_outside_services.rtf < prev    next >
Text File  |  1993-11-08  |  4KB  |  97 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Ohlfs;}
  2. \paperw11220
  3. \paperh7740
  4. \margl120
  5. \margr160
  6. {\colortbl;\red0\green0\blue0;\red83\green83\blue83;\red84\green84\blue84;\red82\green82\blue82;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  How do I cause mail to be automatically forwarded to destinations outside our local network through some outside service?\
  8. \
  9. A:  You'll need to make some minor changes to your mailhost's 
  10. \b sendmail.cf
  11. \b0  file.  The sendmail configuration file, 
  12. \b /etc/sendmail/sendmail.cf
  13. \b0  is either a link to 
  14. \b sendmail.mailhost.cf
  15. \b0  or is some variant of the mailhost configuration.  You edit this file on your mailhost—the machine which is responsible for forwarding mail.\
  16. \
  17. Look for the following lines near the top of the file (in the default 
  18. \b sendmail.mailhost.cf
  19. \b0 , they start at line 30):\
  20. \
  21.  
  22. \pard\tx1240\tx2480\tx3740\tx4980\tx6240\tx7480\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 # If you want to use a relay mailer, examine ruleset 0.  There are some\
  23. # rules that need to be uncommented\
  24. DMuucp\
  25. \
  26. # major relay host: use the $M mailer to send mail to other domains\
  27. # To have mail automatically forwarded to other domains, you should\
  28. # replace this with the name of your major relay host.\
  29. DR mail-relay\
  30. CR mail-relay\
  31.  
  32. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28\fc0\cf0 \
  33. The line\
  34. \
  35.  
  36. \pard\tx1240\tx2480\tx3740\tx4980\tx6240\tx7480\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 DMuucp\
  37.  
  38. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28\fc0\cf0 \
  39. tells sendmail that mail destined for a machine off the local network should be forwarded using the “uucp” mailer — i.e., using the UNIX UUCP facility.  The lines \
  40. \
  41.  
  42. \pard\tx1240\tx2480\tx3740\tx4980\tx6240\tx7480\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 DR mail-relay\
  43. CR mail-relay\
  44.  
  45. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28\fc0\cf0 \
  46. indicate that the machine called 
  47. \b mail-relay
  48. \b0  is the forwarding host.  Change these three lines to reflect your actual situation.  Typically, 
  49. \b uucp
  50. \b0  is the appropriate mailer if you're not on the Internet.  Either replace 
  51. \b mail-relay
  52. \b0  with the name of your UUCP partner, or ensure that 
  53. \b mail-relay
  54. \b0  is a host alias of that partner.  (Note that if you make 
  55. \b mail-relay
  56. \b0  be an alias for that partner and you're using UUCP as the relay mail mechanism, you have to modify the UUCP configuration files to reflect this alias.)\
  57. \
  58. If you look at the comments which begin the excerpt included above, you see a note regarding uncommenting some lines in “ruleset 0.”  Look for the following lines in 
  59. \b sendmail.cf
  60. \b0  (at line 323 in the default 
  61. \b sendmail.mailhost.cf
  62. \b0 ):\
  63. \
  64.  
  65. \pard\tx1240\tx3180\tx4980\tx7680\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 # If you want to pass all other explicit domain names up the ladder\
  66. # to our forwarder then uncomment the following line.\
  67. #R$*<@$*.$+>$*    $#$M    $@$R $:$1<@$2.$3>$4    user@any.domain\
  68. # and comment out this one.\
  69. R$*<@$+.$->$*    $#ddn $@ $2.$3 $:$1<@$2.$3>$4    user@any.domain\
  70.  
  71. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28\fc0\cf0 \
  72. These lines describe how to forward non-local mail.  In the default file for a mailhost, such mail is forwarded using the 
  73. \b ddn
  74. \b0  mailer (i.e., over the Internet).  We want to change that, to use the mail specified above, in the 
  75. \b DM
  76. \b0  line.  To do this, uncomment the third line and comment out the fifth line:\
  77. \
  78.  
  79. \pard\tx1240\tx3180\tx4980\tx7680\tx8720\tx9980\tx11220\tx12480\f1\fs20\fi720\fc1\cf1 # If you want to pass all other explicit domain names up the ladder\
  80. # to our forwarder then uncomment the following line.\
  81. R$*<@$*.$+>$*    $#$M    $@$R $:$1<@$2.$3>$4    user@any.domain\
  82. # and comment out this one.\
  83. #R$*<@$+.$->$*    $#ddn $@ $2.$3 $:$1<@$2.$3>$4    user@any.domain\
  84.  
  85. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28\fc0\cf0 \
  86.  
  87. \b WARNING
  88. \b0 : Be 
  89. \i very
  90. \i0  careful when you modify a sendmail configuration file.  As you might notice, the syntax is arcane and cryptic, and the “rewriting rules” in the configuration file are intricate.\
  91. \
  92. QA600\
  93. \
  94. Valid for 1.0, 2.0 ,3.0, 3.1\
  95. \
  96.  
  97.